// 权限接口
export default {
    pressMock: (options) => {
        let { role } = JSON.parse(options.body)
        console.log(role);
        // 根据不同的角色 返回不同数据 左侧菜单栏数据
        if (role == '管理员') {
            return {
                code: 200,
                msg: "请求成功",
                data: [ // 返回路由对象数组
                    {
                        path: 'shenpi',
                        meta: {
                            title: "审批管理",
                            icon: 'el-icon-s-help'
                        },
                        name: 'Shenpi'
                    },
                    {
                        path: 'qingjia',
                        meta: {
                            title: "请假审批",
                            icon: 'el-icon-s-grid'
                        },
                        name: 'Qingjia'
                    },
                    {
                        path: 'woqingjia',
                        meta: {
                            title: "我要请假",
                            icon: 'el-icon-s-opportunity'
                        },
                        name: 'Woqingjia'
                    }
                ]
            }
        } else {
            return {
                code: 200,
                msg: "请求成功",
                data: [ // 返回路由对象数组
                    {
                        path: 'woqingjia',
                        meta: {
                            title: "我要请假",
                            icon: 'el-icon-s-opportunity'
                        },
                        name: 'Woqingjia'
                    }
                ]
            }
        }
    }

}